package cc.atliberty.oa.service.impl;

import cc.atliberty.oa.mapper.UserMapper;
import cc.atliberty.oa.pojo.User;
import cc.atliberty.oa.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
    
    @Autowired
    private UserMapper userMapper;
    
    @Override
    public User checkUser(User user) {
        return userMapper.selectByUser(user);
    }
    

    @Override
    public int insertUser(User user) {
        return userMapper.insertByUser(user);
    }

    @Override
    public int checkUser(String username) {
        return userMapper.selectByName(username);
    }
}
